'use strict';

const Controller = require('egg').Controller;

class GetCartListController extends Controller {
  async index() {
    
    const { ctx } = this;
    var res = await ctx.model.User.find({},{"cartList":1});
    console.log(res);
    ctx.body ={
      msg:"购物车相关数据",
      code:200,
      res:res[0].cartList
    }
  }
}

module.exports = GetCartListController;
